package cn.jzq.kotoba.modules.rabbitmq.controller;

import cn.hutool.core.date.DateUtil;
import cn.jzq.kotoba.modules.rabbitmq.service.LogSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * log send test
 * @author jzq
 * @date 2018-09-10
 */
@RestController
@RequestMapping("/mq")
public class LogSendController {

    @Autowired
    private LogSendService logSendService;

    @GetMapping("/msg")
    public void sendMsg(String msg) {
        logSendService.send(msg);
        System.out.println(DateUtil.now());
    }
}
